<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>学生信息管理系统</title>
</head>
<body>
    <h1 align="center">学生信息管理系统</h1>
    <h3 >
    <table align="center">
      <thead>
        <tr>
            <th >ID</th>
            <th >名字</th>
            <th >性别</th>
            <th >创建时间</th>
            <th colspan="2">操作</th>
        </tr>
    </thead>
    <tbody>
        <tr th:each="s:${stu}">
            <td th:text="${s.id}">1</td>
            <td th:text="${s.name}">2</td>
            <!-- <td th:text="${s.gender}">3</td> -->
            <td th:if="${s.gender eq 1}">男</td>
            <td th:if="${s.gender eq 0}">女</td>
            <td th:text="${#dates.format(s.cttime, 'yyyy.MM.dd')}">4</td>
            <td>
                <a th:href="@{/student/delete/{id}(id=${s.id})}">删除</a>
                </td>
            <td>
                <a th:href="@{/student/update/{id}(id=${s.id})}">修改</a>
            </td>
        </tr>
    </tbody>
  </table>
  </h3>
  <h2 align="center">
    <a th:href="@{/student/add}">新增学生</a>
  </h2>
</body>
</html>